package com.hourses.mapper;

import com.hourses.pojo.ProductType;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface ProductTypeMapper {
    //查询所有商品的商品分类树
    public List<ProductType> selectAllType();

    //根据type_code查询商品分类
    public ProductType selectByTypeCode(ProductType productType);

    //根据typeName查询productType
    public ProductType selectByTypeName(String typeName);

    //增加商品分类
    public Integer insertProductType(ProductType productType);

    //删除商品分类
    public Integer deleteProducttype(Integer typeId);

    //修改商品分类
    public Integer updateProductType(ProductType productType);
}